package day05;

import java.util.Scanner;

public class text {
    public static void main(String[] args) {
        int sum = 0;
        int[] arr;
        sum=getMaxOfARray();
        System.out.println(sum);

        arr=printArrayData();
        for(int i=0;i<=arr.length;i++){
            System.out.println(arr[i]);
        }
    }

    public static int getMaxOfARray(){
        int[] arr = new int[5];
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<5;i++){
            arr[i]=sc.nextInt();
        }

        int max = arr[0];
        for(int i=1;i<arr.length;i++){
            if(arr[i]>max){
                max=arr[i];
            }
        }
        return max;
    }

    public static int[] printArrayData(){
        int[] arr = new int[5];
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<5;i++){
            arr[i]=sc.nextInt();
        }
        return arr;
    }
}
